home *** CD-ROM | disk | FTP | other *** search
/ Aminet 2 / Aminet AMIGA CDROM (1994)(Walnut Creek)[Feb 1994][W.O. 44790-1].iso / Aminet / dev / asm / TBSource.lha / NBBS / SetProg / SPSetGads.i < prev    next >
Text File  |  1993-07-02  |  2KB  |  78 lines

  1.  
  2. ;This part sets all of the gadgets to correspond with the settings
  3.  
  4. SetGads:    lea.l    StopB1Gad(pc),a0
  5.         move.w    #$06,$c(a0)
  6.         lea.l    StopB2Gad(pc),a0
  7.         move.w    #$06,$c(a0)
  8.         lea.l    DataB7Gad(pc),a0
  9.         move.w    #$06,$c(a0)
  10.         lea.l    DataB8Gad(pc),a0
  11.         move.w    #$06,$c(a0)
  12.         lea.l    ParityNGad(pc),a0
  13.         move.w    #$06,$c(a0)
  14.         lea.l    ParityEGad(pc),a0
  15.         move.w    #$06,$c(a0)
  16.         lea.l    ParityOGad(pc),a0
  17.         move.w    #$06,$c(a0)
  18.         lea.l    ParityMGad(pc),a0
  19.         move.w    #$06,$c(a0)
  20.         lea.l    ParitySGad(pc),a0
  21.         move.w    #$06,$c(a0)
  22.         lea.l    XONXOFFGad(pc),a0
  23.         move.w    #$06,$c(a0)
  24.         lea.l    DuplexFGad(pc),a0
  25.         move.w    #$06+GADGDISABLED,$c(a0)
  26.         lea.l    DuplexHGad(pc),a0
  27.         move.w    #$06+GADGDISABLED,$c(a0)
  28.         lea.l    DuplexEGad(pc),a0
  29.         move.w    #$06+GADGDISABLED,$c(a0)
  30.         cmp.b    #$01,SerStopBits
  31.         bne    SGStopB2
  32.         lea.l    StopB1Gad(pc),a0
  33.         move.w    #$86,$c(a0)
  34.         jmp    SetGads1
  35. SGStopB2:    lea.l    StopB2Gad(pc),a0
  36.         move.w    #$86,$c(a0)
  37. SetGads1:    cmp.b    #$07,SerDataBits
  38.         bne    SGDataB8
  39.         lea.l    DataB7Gad(pc),a0
  40.         move.w    #$86,$c(a0)
  41.         jmp    SetGads2
  42. SGDataB8:    lea.l    DataB8Gad(pc),a0
  43.         move.w    #$86,$c(a0)
  44. SetGads2:    btst.b    #SERB_PARTY_ON,SerFlags
  45.         beq    SGParityE
  46.         lea.l    ParityNGad(pc),a0
  47.         move.w    #$86,$c(a0)
  48.         jmp    SetGads3
  49. SGParityE:    btst.b    #SERB_PARTY_ODD,SerFlags
  50.         bne    SGParityM
  51.         lea.l    ParityOGad(pc),a0
  52.         move.w    #$86,$c(a0)
  53.         jmp    SetGads3
  54. SGParityM:    btst.b    #SEXTB_MARK,SerExtFlags+3
  55.         bne    SGParityS
  56.         lea.l    ParityMGad(pc),a0
  57.         move.w    #$86,$c(a0)
  58.         jmp    SetGads3
  59. SGParityS:    lea.l    ParitySGad(pc),a0
  60.         move.w    #$86,$c(a0)
  61. SetGads3:    btst.b    #SERB_XDISABLED,SerFlags
  62.         beq    SetGads4
  63.         lea.l    XONXOFFGad(pc),a0
  64.         move.w    #$86,$c(a0)
  65. SetGads4:    cmp.b    #$00,SerDuplex
  66.         bne    SGDuplexH
  67.         lea.l    DuplexFGad(pc),a0
  68.         move.w    #$86+GADGDISABLED,$c(a0)
  69.         jmp    SetGads5
  70. SGDuplexH:    cmp.b    #$01,SerDuplex
  71.         bne    SGDuplexE
  72.         lea.l    DuplexHGad(pc),a0
  73.         move.w    #$86+GADGDISABLED,$c(a0)
  74.         jmp    SetGads5
  75. SGDuplexE:    lea.l    DuplexEGad(pc),a0
  76.         move.w    #$86+GADGDISABLED,$c(a0)
  77. SetGads5:    rts
  78.